![]() |
AddIconToSuite |
||||
Header: | Icons.h | Carbon status: | Supported | |
Adds an icon to an icon suite.
OSErr AddIconToSuite ( Handle theIconData, IconSuiteRef theSuite, ResType theType );
A handle to the data for the new icon to be added to the icon suite. You can obtain a handle to icon data using various functions, such as GetIcon or GetResource.
The handle to the icon data is added at the location reserved for icon data of the type specified by theType. If the icon suite already includes a handle to icon data for that type, this function replaces the handle to the old data without disposing of it. In this case you may want to call the GetIconFromSuite function first to obtain the old handle so that you can dispose of it.
The handles that you add to the suite do not have to be associated with a resource fork. For example, your application might get icon data from the desktop database rather than reading it from a resource, or your application might read icon data from a resource and then detach it.
A handle to the icon suite to which to add the icon.
The resource type of the new icon. The resource type should be that of an icon family member.
A result code.
This function is most often used to read icons into an empty icon suite created with the NewIconSuite function.
This function may move or purge memory blocks in the application heap. For that reason, your application should not call it at interrupt time.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)